<%@ page language="java" import="java.util.*" pageEncoding="utf-8"  contentType="text/html; charset=utf-8"%>
<jsp:include page="../head.jsp"></jsp:include>
<body>
<div id="pager">
<jsp:include page="../top.jsp"><jsp:param name="topCurrent" value="1" /></jsp:include>    
<jsp:include page="leftSms.jsp"> <jsp:param name="smsSendStyle" value="11" /></jsp:include> 
    <section id="container">
        <div id="crumbs">
        	短信管理 &raquo; 短信发送
        </div>
    <div id="main">
        	<div class="tabs">
                <ul class="tabs-nav clearfix">
                    <li>普通短信</li>
                    <li>点点通</li>
                </ul>
                <div class="tabs-panel">
			      <form id="frmMessage" name="frmMessage"   method="post">
			      <%
			    
			  	try{
			  	  String result = session.getAttribute("result").toString();
				      if(!result.equals("")){
				    	  out.println("<script>alertmess('"+result+"');</script>");
							session.removeAttribute("result");
						}
					 }catch(Exception ex){
					 
					 }
			      %>
                	<table width="100%" class="form">
                      <tr>
                        <th scope="row">接收方：</th>
                        <td>
                        	<input type="text" id="mobile" maxlength="11" name="mobile" value="" size="30" />&nbsp;<input type="button" onclick="addNumberSM(7,frmMessage,'select1')" value="添加联系人" >
                        <input type="button" value="通讯录" 
                        onclick="selectDirPhone(frmMessage,'frmMessage',select1)"/>
                        </td>
                      </tr>
                      <tr>
                      <th scope="row">接收人：</th>
                      <td>
                             <input type="hidden" id="txtArea" name="txtArea" value=""/>  
				              <table  border="0" cellspacing="0" cellpadding="0">
				                <tr>
				                  <td>
				                     <select id="select1" name="select1" size="6" multiple="multiple"  style="width:150px;">
				                  </select><font color="#FF0000">*</font>
				             	</td>
				                  <td>
				                    <input name="addGroupSelf" type="button" id="addGroupSelf2" class="from_button"   onClick="deletePhone('select1')" value="删除联系人">
				                 </td>
				                </tr>
				              </table>
				             
                      </td>
                      </tr>
                      <tr>
                        <th scope="row">信息内容：</th>
                        <td>
                            <textarea cols="80" rows="5"  id="message" name="message" onmousemove="return checkoverflowSM(frmMessage,300)" onKeyUp="return checkoverflowSM(frmMessage,300)"></textarea>
                            <span>还剩<strong style="color:red;"><font color="#FF0000">
                            <input id="counterMsg" name="counterMsg" style="border:0;color:red;valign:center; background-color:#FFFFFF;background-image:url()" value="300" size="2" type='text' readonly></font></strong>字</span>
                            <br>
                           <input type="button" onClick="frmMessage.mb=$.msgbox({
        height:500,
        width:700,
        content:{type:'iframe',content:'SmsModule/SelectSmsTemplate.jsp?tabIndex=1&inFormName=frmMessage'},
        title: '常用短语',
        onClose: function(v){
        frmMessage.message.value+=(frmMessage.mb.rtVl==undefined?'':frmMessage.mb.rtVl);
        frmMessage.message.focus();
        } 
        
    });" value="选择常用短语" />
                        </td>
                      </tr>
                      <tr>
                        <th scope="row">是否定时发送：</th>
                        <td>
                          	<input type="radio" id="time" name="time" value="thistime" checked="checked" onclick="isReceveSM(frmMessage,true,'isReceve1');">否
                          	<input type="radio" id="time" name="time" onclick="isReceveSM(frmMessage,false,'isReceve1');" value="time">是
                        </td>
                      </tr>
                      <tr id="isReceve1"  style="display:none;">
                       	<th scope="row">选择时间:</th>
                       	<td>
						 <input type="text" id="sendTime" name="sendTime" class="Wdate" size="26"  readonly="readonly" onclick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd HH:mm:ss'})" />
						  
                       	</td>
                       </tr>
                      <tr>
                        <th scope="row"></th>
                        <td><input type="button" onclick="insertallSM(frmMessage)" value=" 提  交 " /></td>
                      </tr>
                    </table>
                    </form>         
                </div>
                <div class="tabs-panel">
                  <form id="fileForm" name="fileForm" enctype="multipart/form-data"   method="post" action="./TbSmsServlet?method=upLoad"
                  onsubmit="return startStatusCheck();" >
                	<table width="100%" class="form">
                	<tr>
                	<td class="tc">xls导入模版：</td>
                	<td>
                	    <a href="./module/qunfa.xls" >点击这里下载导入模板</a>
                	</td>
                	</tr>
                	
                      <tr>
                        <th>文件名：</th>
                        <td style="width: 662px">
                            <input type="file" name="fileName" id="fileName" value=""/>&nbsp;&nbsp;<input type="button" onclick="upLoad()" value="发送" ><br/>
                            <p><img src="images/one-one.gif">&nbsp;<img src="images/one-one-txt.gif"></p>
                            
                        </td>
                      </tr>
                    </table>
                    </form>  
                </div>
             </div>
          </div>
          
    </section>
    <jsp:include page="../foot.jsp"></jsp:include>
</div>
</body>
</html>